package com.zbs.framework.swagger.entity.eolink;

import lombok.Data;

import java.util.List;

@Data
public class EolinkModel {

    private Long groupID;
    private String groupName;
    private Long parentGroupID;
    private Integer groupOrder;
    private String groupPath;
    private Integer groupDepth;
    private List<EolinkModel> childGroupList;
    private List<EolinkApiModel> apiList;

    public EolinkModel(Long groupID,String groupName,Long parentGroupID,String groupPath,Integer groupDepth,List<EolinkModel> childGroupList,List<EolinkApiModel> apiList) {
        this.groupID = groupID;
        this.groupName = groupName;
        this.parentGroupID = parentGroupID;
        this.groupOrder = null;
        this.groupPath = groupPath;
        this.groupDepth = groupDepth;
        this.childGroupList = childGroupList;
        this.apiList = apiList;
    }

    public static EolinkModel build(Long groupID,String groupName,Long parentGroupID,String groupPath,Integer groupDepth,List<EolinkModel> childGroupList,List<EolinkApiModel> apiList) {
        return new EolinkModel(groupID, groupName, parentGroupID, groupPath, groupDepth, childGroupList, apiList);
    }
}
